<?php
namespace Flow\models;

class XhflowFlownode extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iFNId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iMFId;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sName;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iCode;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sTargetUser;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sHandledUser;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sUnhandledUser;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sTargetArea;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bNeedAll;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bImportant;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     * 1=未开始，2=等待处理，3=处理完成，4=退回，5=跳过
     */
    public $iStatus;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=true)
     */
    public $iLastModifyUserId;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        parent::initialize();
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHFlow_FlowNode';
    }

    public function setSource($moduleName)
    {
        parent::setSource("XH{$moduleName}_FlowNode");
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhflowFlownode[]|XhflowFlownode
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhflowFlownode
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
